import request from '@/utils/request'

/* 封装一个获取所有权限点的接口 */
export const sysPermission = () => {
  return request({
    url: '/sys/permission'
  })
}
/* 封装一个添加权限的接口 */
export const sysPermissionPut = (data) => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
/* 封装一个编辑权限的接口 */
export const sysPermissionPuts = (data) => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
/* 封装一个删除接口 */
export const sysPermissionDetele = (id) => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
